package com.hx.petsever.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hx.petsever.entity.Vip;
import org.apache.ibatis.annotations.*;

@Mapper
public interface VipMapper extends BaseMapper<Vip> {

    @Insert("INSERT INTO user_vip SET userid = #{userid}, vip = #{vip} , account = #{account}")
    void insertvip(@Param("userid") String userid , @Param("vip") Integer vip , @Param("account") Integer account);

    @Select("SELECT * FROM user_vip WHERE userid = #{userid}")
    Vip havaVip(@Param("userid") String userid);

    @Update("UPDATE user_vip SET  ACCOUNT = #{account} WHERE userid = #{userid}")
    void updateAccount(@Param("userid") String userid,@Param("account") Integer accout);

}
